package com.cz.business.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>对库存操作</p>
 * <p>
 * <pre>
 * @author gitamacai
 * @date 2019/12/10 16:09
 * </pre>
 */
@FeignClient(name = "storage-service")
public interface StorageFeignClient {
    /**
     * 扣除库存
     *
     * @param commodityCode 商品code
     * @param count         扣除数量
     */
    @GetMapping("/storage/deduct")
    void deduct(@RequestParam("commodityCode") String commodityCode,
                @RequestParam("count") Integer count);

}